Skip to content

Add null check before calling fabricSuspendOnActiveViewTransition#36310

Merged
zeyap merged 1 commit intofacebook:mainfrom
zeyap:add-null-check-suspendOnActiveVT
Apr 17, 2026
Merged

Add null check before calling fabricSuspendOnActiveViewTransition#36310
zeyap merged 1 commit intofacebook:mainfrom
zeyap:add-null-check-suspendOnActiveVT

Conversation

@zeyap
Copy link
Copy Markdown
Contributor

@zeyap zeyap commented Apr 17, 2026

Summary

  • Adds a null check before calling fabricSuspendOnActiveViewTransition() in the Fabric renderer's suspendOnActiveViewTransition export
  • Prevents crashes on hosts where nativeFabricUIManager does not yet implement suspendOnActiveViewTransition

Test plan

  • Verified the change compiles correctly
  • Hosts with suspendOnActiveViewTransition implemented continue to work as before
  • Hosts without suspendOnActiveViewTransition no longer crash when view transitions are active

fabricSuspendOnActiveViewTransition may not be available on all versions
of nativeFabricUIManager. Guard the call with a null check to prevent
crashes on hosts that haven't implemented this method yet.
@meta-cla meta-cla bot added the CLA Signed label Apr 17, 2026
@zeyap zeyap merged commit 1ddff43 into facebook:main Apr 17, 2026
239 of 240 checks passed
@react-sizebot
Copy link
Copy Markdown

Comparing: d1727fb...cf09724

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB = 1.88 kB 1.88 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 612.93 kB 612.93 kB = 108.31 kB 108.31 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.84 kB 6.84 kB +0.05% 1.88 kB 1.88 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 678.86 kB 678.86 kB = 119.27 kB 119.27 kB
facebook-www/ReactDOM-prod.classic.js = 698.60 kB 698.60 kB = 122.74 kB 122.74 kB
facebook-www/ReactDOM-prod.modern.js = 688.92 kB 688.92 kB = 121.13 kB 121.13 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against cf09724

github-actions bot pushed a commit that referenced this pull request Apr 17, 2026
…6310)

## Summary
- Adds a null check before calling
`fabricSuspendOnActiveViewTransition()` in the Fabric renderer's
`suspendOnActiveViewTransition` export
- Prevents crashes on hosts where `nativeFabricUIManager` does not yet
implement `suspendOnActiveViewTransition`

## Test plan
- Verified the change compiles correctly
- Hosts with `suspendOnActiveViewTransition` implemented continue to
work as before
- Hosts without `suspendOnActiveViewTransition` no longer crash when
view transitions are active

DiffTrain build for [1ddff43](1ddff43)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Apr 19, 2026
…cebook#36310)

## Summary
- Adds a null check before calling
`fabricSuspendOnActiveViewTransition()` in the Fabric renderer's
`suspendOnActiveViewTransition` export
- Prevents crashes on hosts where `nativeFabricUIManager` does not yet
implement `suspendOnActiveViewTransition`

## Test plan
- Verified the change compiles correctly
- Hosts with `suspendOnActiveViewTransition` implemented continue to
work as before
- Hosts without `suspendOnActiveViewTransition` no longer crash when
view transitions are active

DiffTrain build for [1ddff43](facebook@1ddff43)
github-actions bot pushed a commit to code/lib-react that referenced this pull request Apr 19, 2026
…cebook#36310)

## Summary
- Adds a null check before calling
`fabricSuspendOnActiveViewTransition()` in the Fabric renderer's
`suspendOnActiveViewTransition` export
- Prevents crashes on hosts where `nativeFabricUIManager` does not yet
implement `suspendOnActiveViewTransition`

## Test plan
- Verified the change compiles correctly
- Hosts with `suspendOnActiveViewTransition` implemented continue to
work as before
- Hosts without `suspendOnActiveViewTransition` no longer crash when
view transitions are active

DiffTrain build for [1ddff43](facebook@1ddff43)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants